/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.agh.student.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import org.hibernate.validator.NotNull;
import org.hibernate.validator.Pattern;

/**
 * 
 * @author janburkot
 */
@Embeddable
public class Applicant implements Serializable {

	private String firstname;
	private String lastname;
	private String fatherFirstname;
	private String motherFirstname;
	private String pesel;
	private String nip;
	private Address address;
	private Education education;

	@Embedded
	public Address getAddress() {
		if (address == null) {
			address = new Address();
		}
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	// @NotNull
	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	// @NotNull
	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	// @NotNull
	// @Pattern(regex="\\d")
	public String getPesel() {
		return pesel;
	}

	public void setPesel(String pesel) {
		this.pesel = pesel;
	}

	@Enumerated(EnumType.STRING)
	public Education getEducation() {
		return education;
	}

	public void setEducation(Education education) {
		this.education = education;
	}

	public String getFatherFirstname() {
		return fatherFirstname;
	}

	public void setFatherFirstname(String fatherFirstname) {
		this.fatherFirstname = fatherFirstname;
	}

	public String getMotherFirstname() {
		return motherFirstname;
	}

	public void setMotherFirstname(String motherFirstname) {
		this.motherFirstname = motherFirstname;
	}

	public String getNip() {
		return nip;
	}

	public void setNip(String nip) {
		this.nip = nip;
	}
}
